ios - Get User class user details by using pointer in other class -
in condition need current user , other user.i getting current user data fine, dont know how other user data.my code is
pfuser *user1 = [pfuser currentuser]; pfobject *user2 = [pfobject objectwithoutdatawithclassname:@"_user" objectid:objid];
my output user1 is
<pfuser: 0x7fd3427923f0, objectid: a1p2zzf46e, localid: (null)> { email = "xxxx@gmail.com"; fullname = xxxx; picture = "<pffile: 0x7fd342791950>"; thumbnail = "<pffile: 0x7fd342791ee0>"; username = "xxxx@gmail.com"; }
but user2 is
<pfuser: 0x7fd3448b8bd0, objectid: xlunx9rzdv, localid: (null)> { }
because using objectwithoutdatawithclassname
return pfobject
objectid
only. so, if want full object objectid
, can use + (pf_nullable pfobject *)getobjectofclass:(nsstring *)objectclass objectid:(nsstring *)objectid
object so:
[pfquery getobjectofclass:@"_user" objectid:objid];
Comments
Post a Comment