Closed thujohn closed 13 years ago
Not directly, unfortunately. What I've done on some past projects is to add a $current_user var to the Admin_Controller (or Authenticated_Controller) and fill it with common values of the logged in user after login.
That would be a good addition to the lib, though. Are you able to submit a pull request with just that change in it?
I don't see any link to submit a pull request :/
I made a pastebin : http://pastebin.com/8z9ViJur
I have an old commit fixing this in my drawer, moslty like yours
I had it on old because what I want is, instead of feeding more kb to cookie, use an $identity userdata (email or username dinamically).
So, ideally, I want a auth->identity()
.
It will return according to config file preference, will setuserdata with $identity_, and also optionally returns auth->identity(email)
or auth->identity(username)
Will commit the simple solution first, the other $identity is will came later, it implies refactoring and I like to carefully implement it and test it
Neverthless... you wrote
Every update I have to do it again. Is there another way ?
Why? Git should take care of that. Are you new to git and DVCS (distributed version control)?
I don't see any link to submit a pull request :/
Humm do you have a ci-bonfire fork?
Yes I'm new to git.
A ci-bonfire fork ? I think not.
Ok, so if it's not a fork, there you have it, that's why you can't see it.
My personal advice: Go into git if you like programming, dive into it, it's a fantastic tool. You'll never regret the time you spent. For a quick crash course, and fast lean (basic) curve, search at CI- forums for GIT IMMERSION
Thanks for the "tuto".
I plan to deepen my knowledge when I have a little more time :) I add it to my todo list ( made with Bonfire :D )
I add it to my todo list ( made with Bonfire :D )
:) I know the feeling... finishing the ToDo and see it... Looks like it can do anything when you see that ToDo list working
I just gave a big laugh here because, being someone always fighting against my self-discipline, having hundreds of todo iPhone apps never used, I've never ever ever tought of using it to my own ticketing systems lol
doh what a dumb I am thanks for that, we're even now ;)
PS I challenge you to finish that ToDo list, by building the "done items" list right bellow. I did it and man, whata initial feeling it was PS 2 Really... don't hesitate much on GIT, dive into as soon as you program something, or just take the first lessons to get the feeling. Take 10m once in a while and start those Git Immersion lessons
You challenge me to finish my ToDo list ??? But I have a MMORPG to finish >.<
Git Immersion lessons... Yes but I'm on Windows so lessons are a little difficults to achieve :)
lol Don't know about your MMORPG, but the ToDo was for fun, a line 2 check if there are any soft_deletes in table, plus a view line to pick your $view_data. When you'll have the time to read documentation and play with bonfire, you'll cherry-pick my challenge, agree?
One more thing What language are you developing your MMORMAPSDFOAJE? (sorry-missed 3 times and got angry eheh)
I'm on windows. And maybe you can use GIT for your project. Don't wanna sound obsessed, but here it goes
cd /c/your_root_dir/your_mmorpg_project/
git init
- you're saying I want BigBrother to live on this foldergit add .
- Start watching everything beneath (the dot acts like .)git commit -m "My first commit, all files added, daK is a pain in the ass"
- here you instruct git to snapshot your project, recording who did it, when, and why.git status
- You'll see BigBrother reportgit add .
- this time, since the file it's already added in the other commit, you're saying prepare for commit, i'm probably going to type git commit again and puts the change aside, in a staging areagit status
you'll se the file is now green - meaning you agree with that changegit commit -m "love you daK"
, or edit your file for some reason and save it again.Ok. Don't have any idea why I just wrote all this but here you have it :P
Thanks for everything :)
I have time but not at the same time ^^ I can't learn by 10 minutes.
I'm using PHP/JS/SQL for my MMORPG. I wonder if I'll not use CodeIgniter to do it again :)
I see, if you have enough experience, go with CI
Why? Well... I think you'll face some problems I had
But yes, you need time to read and learn, for everything
About GIT, it's a little diferent. You can start right away, and should (you've a big project on hands). Also because you'll only fully understand in a long time, when you'll need is power. So you better start right away since you have a big project.
If I were you, and you me, I would have the same attitude as you. I would never go without fully understand what I was going to do.
But I did same mistake, now I regret. GIT is easier to start if you start right away CLI. Reading is obligatory but practicing at the same time.
After all this, I'm sure you'll try GIT later, I was just thinking it could save your life right now (by starting to version you're MMORPG project files)
ufff :)
I'm agree with you but the free plan doesn't accept a private project and for the moment I don't want to pay subscription :/
there are alternatives for you MMORPG (free private), but let's not offtopic this #Issue no more
But glad you stoped by, I'm soon proposing a commit that will change auth->username, although I'm guaranteeing that it will have no impact on existing function. Since you're the only one (besides me) who hit this issue, here's the thing:
I'm extending Use.usernames to also User Name. Meaning that, those who explicity intent to, will have the user first-last name in session var instead of (exclusively) username.
Plus
auth->username()
will return the session data var, or username from somewhere else
auth->user_name()
will return the session data var, or user name from somewhere else
Im' doing it because now it's the time to do it without any implication to existing users or existing performance, and because I don't wanna have another var at session (unless Lonnie thinks it's just minor bytes, having another sessionvar)
@daK - your changes were accepted in the latest pull request. Unless we find an issue down the road, we'll keep them that way for now. Thanks.
I modified the auth library to retrieve the name of the user logged.
I can get it with : $this->auth->username()
Every update I have to do it again. Is there another way ?