aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-11 12:33:48 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-11 12:33:48 +0000
commit7b83d607a33cd2c258da20ea59dc9777f7cf50eb (patch)
tree2b8e1ba28c23cf9242fd4311ca0edb5bd6095e4d /engine/lib/users.php
parent2d61fca50b21d7536bead7f833c716b8009c60a8 (diff)
downloadelgg-7b83d607a33cd2c258da20ea59dc9777f7cf50eb.tar.gz
elgg-7b83d607a33cd2c258da20ea59dc9777f7cf50eb.tar.bz2
Et voila: page ownership!
git-svn-id: https://code.elgg.org/elgg/trunk@160 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 24ded8ce5..7a0de2af0 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -343,6 +343,19 @@
}
/**
+ * Gets a user with a particular username, if they exist
+ *
+ * @param string $username The user's username
+ * @return ElggUser or false
+ */
+ function get_user_from_username($username) {
+ global $CONFIG;
+ $username = (int) sanitise_string($username);
+ return row_to_elgguser(get_data_row("select * from {$CONFIG->dbprefix}users where username = '{$username}'"));
+
+ }
+
+ /**
* Enter description here...
*
* @param unknown_type $criteria