$recipient is brought through a form. This is my code...
<?php
echo $recipient;
$r1 = get_user_by_username($recipient);
$r2 = $r1->getGUID();
?>
and my result is just...
Speedysnail6
it is supposed to display the user guid next to it. What did I do wrong?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
As Matt Said , The problem there is that display name is not unique in core - so you may not get the user you are expecting.
Have you considered using input/userpicker view?
It allows you to write display name and it will show you a list of all users who match that name. The list has also the profile pictures of the users so it doesn't matter even if they have the same display name.
@Speedysnail6 try to use dropdown box
Oh and input/userpicker also provides the guids straight to your action. You don't have to add any logic to find out the guids of the users that you selected from the form. It's all automatic.
@everyone I think I am going to let the user pick if it is a username or list of friends. then, on the profile, there will be a "send credits" button.
Actually, I will use userpicker
You "could" try coding a 'block' to duplicate DisplayNames. Then use that sql query I posted before or similar. And when at the SendCredits Screen --> <select...> via either UserID or DisplayName - should work fine..And if.... U r still trying to 'copy-cat' my fbfk plugin lolz ;-P teehee!!
@Dhrup My system is becoming more advanced than ur fbfk exchange ;).
You can request credits from a user now and much more
'request credits' ? lozl ;oO
FBF$Exchange - Pay Now
This is the FBF$exchange " pay me now..! "
@dhrup
"The bank" = Send credits + Request credits + Generate payment link
- Previous
- 1
- 2
- 3
- 4
- 5
- Next
You must log in to post replies.