The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
user summit Record's - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Documentation (https://userspice.com/forums/forumdisplay.php?fid=30)
+--- Thread: user summit Record's (/showthread.php?tid=510)



user summit Record's - sire - 03-29-2017

im working on a user summit Record's and only they can see the Record and no one els

so im wondering is what is the beat way to how make this work i was thinking of using the users "email" or "ID"?? case username can change though i can make it that the username cant change

what is your input?

thanks,
sire


user summit Record's - mudmin - 03-30-2017

Definitely id. So every single record should have a column called user_id (associated with that user's id).

So when you are doing your query, it would be something like...

Code:
$query = $db->query("SELECT * FROM records WHERE user_id = ?",array($user->data()->id));
Code:
$results = $query->results();

Then
Code:
$results
would contain a full object/array of all records associated with that user id.